<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title th:text="#{memberpage.title}"></title>
        <meta name="description" content="" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
        
        <!--[if lte IE 9]><link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" /><![endif]-->

		<link rel="stylesheet" href="css/css.css" th:href="@{/css/min.css}"/>            
        <script src="http://lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js" th:src="@{http://lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js}"></script>
        <script th:inline="javascript">/*<![CDATA[*/
        window.jQuery || document.write('<script src="'+ /*[[@{/js/vendor/jquery-1.9.0.min.js}]]*/ 'js/vendor/jquery-1.9.0.min.js'
        		+'"><\/script>')
        /*]]>*/</script>
        <script type="text/javascript" th:src="@{/js/econgen.js}"></script>
    </head>
    <body>
        <header th:substituteby="common/template::header"></header>
        
        <div class="container">
        	<div class="row person-info border-ccc">
        		<div class="row padding20">
        		<div class="fourcol">
        			<div class="base-info">
       					<h2><span th:text="${session.session_user.username}"></span> - <span th:text="${session.session_user.firstName}"></span> <span th:text="${session.session_user.lastName}"></span></h2>
       					<div th:text="${#strings.substring(session.session_user.email, 0, 2)} + '****@' + ${#strings.substringAfter(session.session_user.email, '@')}"></div>
       					<div th:text="${session.session_user.mobile}?(${#strings.length(session.session_user.mobile) > 7} ? (${#strings.substring(session.session_user.mobile, 0, 3)} + '****' + ${#strings.substring(session.session_user.mobile, 7, #strings.length(session.session_user.mobile))}) : (${#strings.substring(session.session_user.mobile, 0, 2)} + '****')):#{memberpage.content.mobile.blank}"></div>
        			</div>
        			<div class="verify-info">
        				<a th:text="${session.session_user.emailVerified}?#{memberpage.content.email.verified}:#{memberpage.content.email.notverified}" th:href="@{${session.session_user.emailVerified}?'#':'/i/verifyEmail.html'}"></a>
        				&nbsp;&nbsp;
        				<a th:text="${session.session_user.mobileVerified}?#{memberpage.content.mobile.verified}:#{memberpage.content.mobile.notverified}" th:href="@{${session.session_user.mobileVerified}?'#':'/i/verifyMobile.html'}"></a>
        			</div>
        		</div>
        		<div class="fourcol">
        			<div class="balance-info">
	        			<h4 th:text="#{memberpage.content.balance.title}"></h4>
	        			<span class="balance" th:text="${session.session_user.totalBalance}?${#numbers.formatDecimal(session.session_user.totalBalance,1,2)}:'0.00'"></span><span th:text="#{memberpage.content.balance.canuse}"></span>
	        			<span th:text="${session.session_user.withDrawing}?${#numbers.formatDecimal(session.session_user.withDrawing,1,2)}:'0.00'"></span><span th:text="#{memberpage.content.balance.dealing}"></span>
        			</div>
        			<div class="balance-operation">
        				<a class="form-btn" th:href="@{/i/withDraw.html}"><span th:text="#{memberpage.content.balance.withdraw}"></span></a>
        			</div>
        		</div>
        		<div class="fourcol last">
        			<div class="other-info">
        				<h4 th:text="#{memberpage.content.other.title}"></h4>
        				<ul>
        					<li><span th:text="#{memberpage.content.credit}"></span> <span th:text="${session.session_user.credit}?${session.session_user.credit}:'0'"></span></li>
        					<li><span th:text="#{memberpage.content.bankinfo}"></span> <a th:text="${session.session_user.bank}?#{memberpage.content.bankinfo.ok}:#{memberpage.content.bankinfo.no}" th:href="@{/i/bank}"></a></li>
        					<li><span th:text="#{memberpage.content.account}"></span> <a th:href="@{/account}" th:text="#{memberpage.content.accountnum(${accountCount})}"></a></li>
        					<li><a th:href="@{/i/references/0}" th:text="#{memberpage.content.myref}"></a></li>
        				</ul>
        			</div>
        		</div>
        		</div>
        	</div>
        	<div class="row">
        		<div class="threecol side-bar">
        			<div class="twelvecol border-ccc">
	        			<ul>
	        				<li><a th:href="@{/i/myInfo.html}" th:text="#{memberpage.content.personalinfo}"></a></li>
	        				<li><a th:href="@{/i/p.html}" th:text="#{memberpage.content.passwordupdate}"></a></li>
	        				<li><a th:href="@{/i/bank.html}" th:text="#{memberpage.content.bankinfomanage}"></a></li>
	        				<li><a th:href="@{/i/references/0}" th:text="#{memberpage.content.referenceinfo}"></a></li>
	        				<li><a th:href="@{/i/withDraw.html}" th:text="#{memberpage.content.withdraw}"></a></li>
	        				<li><a th:href="@{/i/withDrawHis.html}" th:text="#{memberpage.content.withdrawhistory}"></a></li>
	        				<li><a th:href="@{/account}" th:text="#{memberpage.content.accountmanage}"></a></li>
	        				<li><a th:href="@{/i/commission/0}" th:text="#{memberpage.content.commissionrecord}"></a></li>
	        				<li><a th:href="@{/i/loginLog/0}" th:text="#{memberpage.content.loginrecord}"></a></li>
	        				<li><a th:href="@{/i/communicate}" th:text="#{memberpage.content.communicate}"></a></li>
	        			</ul>
        			</div>
        		</div>
        		<div class="ninecol last main-info">
        			<div class="table">
        				<div class="title">
        					<h3 th:text="#{memberpage.content.lastlogininfo}"></h3>
        					<ul class="table-op">
	        					<li><a th:href="@{/i/loginLog/0}" th:title="#{table.more}"><i class="icon-list"></i></a></li>
	        				</ul>
        				</div>
        				<table>
        					<thead>
        						<tr>
        							<th th:text="#{memberpage.content.logintable.header1}"></th>
        							<th th:text="#{memberpage.content.logintable.header2}"></th>
        							<th th:text="#{memberpage.content.logintable.header3}"></th>
        						</tr>
        					</thead>
        					<tbody>
        						<tr th:each="loginLog : ${loginLogList}">
        							<td th:text="${loginLog.useLoginUsername == 'auto_login'}?#{memberpage.content.logintable.autologin}:${loginLog.useLoginUsername}"></td>
        							<td th:text="${loginLog.ipAddr}"></td>
        							<td th:text="${loginLog.time}?${#dates.format(loginLog.time, 'yyyy-MM-dd HH:mm:ss')}"></td>
        						</tr>
        					</tbody>
        				</table>
        			</div>
        			<div class="table">
        				<div class="title">
        					<h3 th:text="#{memberpage.content.lastcommissioninfo}"></h3>
        					<ul class="table-op">
	        					<li><a th:href="@{/i/commission/0}" th:title="#{table.more}"><i class="icon-list"></i></a></li>
	        				</ul>
        				</div>
        				<table>
        					<thead>
        						<tr>
        							<th th:text="#{memberpage.content.commissiontable.header1}"></th>
        							<th th:text="#{memberpage.content.commissiontable.header2}"></th>
        							<th th:text="#{memberpage.content.commissiontable.header3}"></th>
        							<th th:text="#{memberpage.content.commissiontable.header4}"></th>
        						</tr>
        					</thead>
        					<tbody>
        						<tr th:each="commissionRecord : ${commissionRecordList}">
        							<td th:text="${commissionRecord.brokerName}"></td>
        							<td th:text="${commissionRecord.accountNo}"></td>
        							<td th:text="${commissionRecord.commission}?${#numbers.formatDecimal(commissionRecord.commission,1,5)}"></td>
        							<td th:text="${commissionRecord.time}?${#dates.format(commissionRecord.time, 'yyyy-MM-dd HH:mm:ss')}"></td>
        						</tr>
        						<tr th:if="${#arrays.isEmpty(commissionRecordList)}">
	        						<td colspan="4" th:text="#{table.nodata}"></td>
	        					</tr>
        					</tbody>
        				</table>
        			</div>
        		</div>
        	</div>
        </div>

        <footer th:substituteby="common/template::footer"></footer>
        
    </body>
</html>
